package Finance::NSCC::Insurance::Schema::ServiceFeature;

use strict;
use warnings;

use base 'DBIx::Class';

__PACKAGE__->load_components("Core");
__PACKAGE__->table("service_features");
__PACKAGE__->add_columns(
  "id",
  { data_type => "INT", default_value => undef, is_nullable => 0, size => 11 },
  "nscc_num",
  { data_type => "CHAR", default_value => "", is_nullable => 0, size => 4 },
  "contract_num",
  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 30 },
  "id_code",
  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 4 },
  "name",
  {
    data_type => "VARCHAR",
    default_value => undef,
    is_nullable => 1,
    size => 35,
  },
  "qty",
  {
    data_type => "DECIMAL",
    default_value => undef,
    is_nullable => 1,
    size => 14,
  },
  "program_type",
  { data_type => "VARCHAR", default_value => undef, is_nullable => 1, size => 4 },
  "start_d",
  { data_type => "DATE", default_value => undef, is_nullable => 1, size => 10 },
  "stop_d",
  { data_type => "DATE", default_value => undef, is_nullable => 1, size => 10 },
  "expense_type",
  { data_type => "VARCHAR", default_value => undef, is_nullable => 1, size => 2 },
  "expense_dollar",
  {
    data_type => "DECIMAL",
    default_value => undef,
    is_nullable => 1,
    size => 14,
  },
  "expense_pct",
  {
    data_type => "DECIMAL",
    default_value => undef,
    is_nullable => 1,
    size => 10,
  },
);
__PACKAGE__->set_primary_key("id");

__PACKAGE__->belongs_to(contract => 'Finance::NSCC::Insurance::Schema::Contract',
                        {
                         'foreign.nscc_num'     => 'self.nscc_num',
                         'foreign.contract_num' => 'self.contract_num',
                        }
                       );

1;
